' ***********************************************************************
' Assembly         : Ioc
' Author           : Tim Ford
' Created          : 10-02-2013
'
' Last Modified By : Tim Ford
' Last Modified On : 10-02-2013
' ***********************************************************************
' <copyright file="IocContainerElements.vb" company="Red Baron Solutions">
'     Red Baron Solutions. All rights reserved.
' </copyright>
' <summary></summary>
' ***********************************************************************


Namespace Ioc.Configuration
    ''' <summary>
    ''' This class represents the structure of the SHI settings structure 
    ''' in the WebConfig.Conf or App.Conf. These are the attributes.
    ''' </summary>
    Public Class IocContainerElements
        Inherits System.Configuration.ConfigurationElement

        ''' <summary>
        ''' Gets the type.
        ''' </summary>
        ''' <value>The type.</value>
        <System.Configuration.ConfigurationProperty("Type", IsRequired:=True)> _
        Public ReadOnly Property Type() As String
            Get
                Return CStr(Me("Type"))
            End Get
        End Property

        ''' <summary>
        ''' Gets the replace with.
        ''' </summary>
        ''' <value>The replace with.</value>
        <System.Configuration.ConfigurationProperty("InstanceType", IsRequired:=True)> _
        Public ReadOnly Property InstanceType() As String
            Get
                Return CStr(Me("InstanceType"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("IsMultipleInstances", IsRequired:=False)> _
        Public ReadOnly Property IsMultipleInstances() As Boolean
            Get
                Return CBool(Me("IsMultipleInstances"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("IsCached", IsRequired:=False)> _
        Public ReadOnly Property IsCached() As Boolean
            Get
                Return CBool(Me("IsCached"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("IsDefault", IsRequired:=False)> _
        Public ReadOnly Property IsDefault() As Boolean
            Get
                Return CBool(Me("IsDefault"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("CacheHours", IsRequired:=False)> _
        Public ReadOnly Property CacheHours() As Integer
            Get
                Return CInt(Me("CacheHours"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("CacheMinutes", IsRequired:=False)> _
        Public ReadOnly Property CacheMinutes() As Integer
            Get
                Return CInt(Me("CacheMinutes"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("CacheSeconds", IsRequired:=False)> _
        Public ReadOnly Property CacheSeconds() As Integer
            Get
                Return CInt(Me("CacheSeconds"))
            End Get
        End Property

        ''' <summary>
        ''' Gets a value indicating whether this instance is singleton.
        ''' </summary>
        ''' <value><c>true</c> if this instance is singleton; otherwise, <c>false</c>.</value>
        <System.Configuration.ConfigurationProperty("IsLocked", IsRequired:=False)> _
        Public ReadOnly Property IsLocked() As Boolean
            Get
                Return CBool(Me("IsLocked"))
            End Get
        End Property
    End Class
End Namespace

